using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using InfoTech.Core.Data.Attributes;
using InfoTech.Core.Data.Dataable;
using InfoTech.Core.Data.Persistence;
using InfoTech.Utilities.Generic;

namespace InfoTech.LanTranh.MucVu.Bussiness
{
	[Serializable]
	[ExtraTable(Name = "EXCEPTION", Schema="Exception")]
	[Table(Name = "[Exception].[EXCEPTION]")]
	public partial class EXCEPTION : ObjPersistence, IDeleteable, IUpdateable, IInsertable, ISelectable, IDeleteablebyId, IUpdateablebyId, ISelectablebyId
	{

		#region Fields

		private System.Guid _exceptionid;

		private System.Int32? _updatetype;

		private System.String _title;

		private System.String _message;

		private System.DateTime? _dateadd;

		private System.Int32? _resulttype;

		#endregion

		#region Properties

		[ExtraColumn(DbType = "uniqueidentifier", Length = 0, TypeName = "System.Guid", Type = typeof(System.Guid), CanBeNull = false)]
		[Column(Name = "EXCEPTIONID", DbType = "uniqueidentifier", IsPrimaryKey = true, CanBeNull = false)]
		public System.Guid EXCEPTIONID
		{
			get
			{
				return _exceptionid;
			}
			set
			{
				OnChanged(this, "EXCEPTIONID");
				_exceptionid = value;
			}
		}

		[ExtraColumn(DbType = "int", Length = 0, TypeName = "System.Int32", Type = typeof(System.Int32), CanBeNull = true)]
		[Column(Name = "UPDATETYPE", DbType = "int", IsPrimaryKey = false, CanBeNull = true)]
		public System.Int32? UPDATETYPE
		{
			get
			{
				return _updatetype;
			}
			set
			{
				OnChanged(this, "UPDATETYPE");
				_updatetype = value;
			}
		}

		[ExtraColumn(DbType = "nvarchar", Length = 1000, TypeName = "System.String", Type = typeof(System.String), CanBeNull = true)]
		[Column(Name = "TITLE", DbType = "nvarchar(1000)", IsPrimaryKey = false, CanBeNull = true)]
		public System.String TITLE
		{
			get
			{
				return _title;
			}
			set
			{
				OnChanged(this, "TITLE");
				_title = value;
			}
		}

		[ExtraColumn(DbType = "ntext", Length = 0, TypeName = "System.String", Type = typeof(System.String), CanBeNull = true)]
		[Column(Name = "MESSAGE", DbType = "ntext", IsPrimaryKey = false, CanBeNull = true)]
		public System.String MESSAGE
		{
			get
			{
				return _message;
			}
			set
			{
				OnChanged(this, "MESSAGE");
				_message = value;
			}
		}

		[ExtraColumn(DbType = "datetime", Length = 0, TypeName = "System.DateTime", Type = typeof(System.DateTime), CanBeNull = true)]
		[Column(Name = "DATEADD", DbType = "datetime", IsPrimaryKey = false, CanBeNull = true)]
		public System.DateTime? DATEADD
		{
			get
			{
				return _dateadd;
			}
			set
			{
				OnChanged(this, "DATEADD");
				_dateadd = value;
			}
		}

		[ExtraColumn(DbType = "int", Length = 0, TypeName = "System.Int32", Type = typeof(System.Int32), CanBeNull = true)]
		[Column(Name = "RESULTTYPE", DbType = "int", IsPrimaryKey = false, CanBeNull = true)]
		public System.Int32? RESULTTYPE
		{
			get
			{
				return _resulttype;
			}
			set
			{
				OnChanged(this, "RESULTTYPE");
				_resulttype = value;
			}
		}

		#endregion

		#region Reflector

		public System.Type Reflector()
		{
			return typeof(EXCEPTION);
		}
		public object Current
		{
			get { return this; }
		}

		#endregion

	}
}
